package com.woniuxy.userassembly.dao;

import com.woniuxy.userassembly.model.RbacUserRole;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Liyfi
 * @since 2021-05-22
 */
public interface RbacUserRoleMapper extends BaseMapper<RbacUserRole> {

    @Insert("insert into rbac_user_role (user_id,role_id) value(#{userId},#{roleId})")
    int addUserRole(RbacUserRole userRole);

    @Select("select * from rbac_user_role where id = #{userRoleId}")
    RbacUserRole selUserRole(int userRoleId);

    @Delete("delete from rbac_user_role where id = #{userRoleId}")
    int delUserRole(int userRoleId);

}
